import request from '@/utils/request'

export function login(username, password, code) {
  return request({
    url: 'login/login.zepc',
    method: 'post',
    data: {
      username,
      password,
      code
    }
  })
}

export function casLogin(st, service) {
  return request({
    url: 'login/login.zepc',
    method: 'post',
    data: { st, service }
  })
}

export function getInfo() {
  return request({
    url: '/login/userInfo.zepc',
    method: 'post',
    data: {}
  })
}

export function logout() {
  return request({
    url: '/login/loginOut.zepc',
    method: 'post'
  })
}

export function qrcode() {
  return request({
    url: '/login/code.zepc',
    method: 'post',
    data: { code: true }
  })
}
